The present exemplary embodiment relates to image processing. It finds particular application in connection with the automated correction of digital images for red-eye.
Red-eye is a common problem in photographic images and can occur whenever a flash is used. Light reflecting from the human retina makes the eyes' pupils appear red instead of their natural color. Recognizing this problem, camera manufacturers have attempted to minimize or inhibit red-eye by equipping cameras with the ability to emit one or more pre-flashes of light immediately prior to completion of the actual photograph. These pre-flashes are intended to constrict the subject's pupils to minimize light incident on the retina and reflected therefrom. Although cameras equipped with pre-flash hardware can alleviate red-eye problems, they are not always well received since the red-eye artifact is not always prevented. They also tend to consume much more energy, induce a significant delay between pushing the button and taking the photograph, and result in people blinking the eyes. Red-eye has become more prevalent and severe as cameras have been made smaller with integrated flashes. The small size coupled with the built-in nature of the flash requires placement of the flash in close proximity to the objective lens. Thus, a greater portion of the reflected light from a subject's retinas enters the object lens and is recorded.
The automatic correction of the red-eye effect in digital photography generally involves two steps. First, a detection step distinguishes red-eye from non red-eye (or other) regions in an image. Second, a correction step attempts to reverse the red-eye effect. Recently, the focus has been on the detection stage. However, even where the detection is performed with reasonable accuracy, it is not uncommon for the correction step to degrade the image to a point where it would have been better to leave the red-eye unaltered.
In one method, an operator visually scans all images and marks those images including red-eye for further processing. The processing typically involves modifying the red pixels in the identified red-eye. Efforts to eliminate or reduce operator involvement have resulted in automated processes that attempt to detect red-eye based upon color, size, and shape criteria. When a red-eye is detected, the automated process applies a correction to the red area. To correct red-eyes, most approaches desaturate the pixels in the detected red-eye regions. Some also modify their luminance. In some approaches, the red-eye regions are smoothed around the edges to provide a more natural looking transition between the corrected and uncorrected portions of the image.
In correcting red-eyes, the altering of chromatic information on the eye may result in a degradation of the original image and the final result is not acceptable for the user. One reason for this is that the correction may remove glint. Glint refers to the typically small, white specular reflections in the eye region of a photograph which give the eye a sparkle. Without the sparkle, eyes can appear dead or flat rendering the photograph unappealing. Glint results from the curvature of the cornea and typically occurs under flash light although it is also found in photographs taken in natural lighting.
Recognizing the importance of glint, some methods artificially insert a glint in the photograph if, after the standard correction, the corrected eye lacks a glint. In one approach a template of an eye is used. The template is composed of a pupil, an iris and possibly other elements, such as glint or sclera. These components are first located within the red-eye region and then corrected differently and separately.